/*
 * rabbit.h
 * @Author: Mike Zou <zxhmike@gmail.com>
 */

#include <linux/types.h>	/* size_t */
#include <linux/cdev.h>		/* cdev */

/* debug function */
#define __DEBUG__
#ifdef __DEBUG__
#	define DEBUG(mesg, param...) \
	printk(KERN_WARNING "rabbit DEBUG " mesg "\n", param)
#else
#	define DEBUG(all...)
#endif

#define RBT_QUANTUM_SIZE 8	/* smallest data size */
#define RBT_MINOR 0		/* beginning index of minor # */
#define RBT_NR_DEVS 8		/* how many this module can handle */

struct rbt_dev {
	size_t size;		/* the size of data in the device */
	struct rbt_data_list *data;		/* the data list ptr */
	struct cdev cdev;	/* char device structure */
};

struct rbt_data_list {
	void *data;		/* ptr to a quantum */
	struct rbt_data_list *next;
};
